<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      /* 手机尺寸 */
      @media screen and (max-width: 768px) {
        .container {
          width: 100%;
        }
      }
      /* 平板屏幕 */
      @media screen and (min-width: 768px) {
        .container {
          width: 750px;
        }
      }
      /* 中等屏幕 */
      @media screen and (min-width: 992px) {
        .container {
          width: 970px;
        }
      }
      /* 大屏幕 */
      @media screen and (min-width: 1200px) {
        .container {
          width: 1170px;
        }
      }
      .container {
        margin: 0 auto;
        height: 200px;
        background-color: pink;
      }
    </style>
  </head>
  <body>
    <div class="container">123</div>
  </body>
</html>
